<template>
	<uni-popup ref="gzStatus" type="bottom">
		<view class="popop">
			<view class="header">
				<view class=""></view>
				<image :src=" iconurl + '/static/user/pop_d.png'" @click="backpop"></image>
			</view>
			<view class="section_cont">
				<view class="sec_left">
					<image :src="priceList.cover" @click="proviewimg(priceList.cover)"></image>
				</view>
				<view class="sec_right">
					<view class="navname">{{priceList.name}}</view>
					<!-- <view class="price">一发入魂</view> -->
					<view class="number">￥{{pay_price}}</view>
				</view>
			</view>
			
			<view class="section3">
				<view class="title">支付方式</view>
				<view class="sec_cont" @click="checks(1)">
					<view class="sec_left">
						<image :src="https://pd.pdaxiang.com/upload/static/user/yu.png"></image>
						<text>余额</text>
					</view>
					<view class="select">
						<image src="https://pd.pdaxiang.com/upload/static/user/checks.png"></image>
					</view>
				</view>
			</view>
			<view class="section1">
				<view>应付：</view>
				<view>￥{{ pay_price }}</view>
			</view>
			<view class="foot" @click="zhifu">确认支付</view>
		</view>
	</uni-popup>
</template>
<script>
// import jisuan from "@/common/toCalculate.js"
// ////console.log(jisuan.add(0.1,0.65))
export default {
	props: {
		priceList: {
			type: Object,
			default() {
				return [];
			}
		},
		pay_price: {
			type: String,
			default() {
				return [];
			}
		}
	},
	data() {
		return {
			check: 1,
			current: 0,
			price: '',
			coupons: '',
			id: '',
			iconurl:this.$configs.urls
		};
	},
	created() {},
	watch: {},
	methods: {
		proviewimg(img) {
			let arr = [];
			arr.push(img);
			uni.previewImage({
				urls: arr
			});
		},
		animationfinish(e) {
			if (e.detail.current == 1) {
				this.$emit('getCoupon');
			}
		},
		open() {
			this.$refs.gzStatus.open();
		},
		//选中优惠券
		choice(index, item) {
			this.price = item.sub_price;
			this.coupons = item.name;
		},
		//切换支付方式
		checks(num) {
			this.check = num;
		},
		//关闭弹窗
		backpop() {
			this.$refs.gzStatus.close();
		},
		//使用优惠券
		detail() {
			this.current = 1;
			this.$emit('getCoupon');
		},
		//返回箭头
		fan() {
			this.current = 0;
		},
		//确认支付
		zhifu() {
			this.$emit('zhifu');
		}
	}
};
</script>

<style lang="scss" scoped>
	.section_cont{
		width: 690rpx;
		margin: 20rpx auto;
		border-radius: 10rpx;
		display: flex;
		align-items: center;
		position: relative;
		.right_top{
			width: 100rpx;
			height: 50rpx;
			background: #FF5123;
			font-size: 24rpx;
			color: #333;
			position: absolute;
			right: 20rpx;
			top: 20rpx;
			border-radius: 20rpx;
		}
		.right_bom{
			display: flex;
			align-items: center;
			position: absolute;
			right: 20rpx;
			bottom: 20rpx;
			image{
				width: 40rpx;
				height: 40rpx;
				margin-right: 10rpx;
			}
			text{
				font-size: 24rpx;
				color: #333;
			}
		}
		.sec_left{
			image{
				width: 240rpx;
				height: 214rpx;
				border-radius: 8rpx;
			}
		}
		.sec_right{
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			height: 180rpx;
			margin-left: 30rpx;
			.navname{
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
				font-weight: 700;
				word-break: break-all;
				text-overflow: ellipsis;
				overflow: hidden;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				-webkit-box-orient: vertical;
			}
			.name{
				font-size: 26rpx;
				font-family: PingFang SC;
				color: #666666;
				word-break: break-all;
				text-overflow: ellipsis;
				overflow: hidden;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				-webkit-box-orient: vertical;
			}
			.number{
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FF2300;
			}
		}
	}
.shere {
	width: 40rpx;
	height: 40rpx;
	margin-right: 20rpx;
}
.block {
	background-repeat: no-repeat;
	background-size: 100% 100%;
	width: 90%;
	height: 200rpx;
	margin: 0 auto;
	margin-top: 20upx;
	display: flex;
	align-items: center;
	position: relative;
	.left {
		padding: 15rpx 0;
		width: 190rpx;
		.sub_price {
			color: #fff;
			font-size: 70rpx;
			text-align: center;
		}
		.txt {
			font-size: 26rpx;
			line-height: 37rpx;
			padding-top: 5rpx;
			color: #fff;
			text-align: center;
		}
		.txts {
			padding-top: 40upx;
		}
		.btns {
			width: 140rpx;
			height: 51rpx;
			line-height: 47rpx;
			background: #ffffff;
			border-radius: 28rpx;
			text-align: center;
			margin-right: 20upx;
			color: #ff6505;
			margin-left: 30upx;
			margin-top: 15upx;
		}
	}
	.right {
		flex: 1;
		padding-left: 60rpx;
		padding-bottom: 30rpx;
		.types {
			font-size: 24upx;
			width: 115upx;
			height: 35upx;
			border-radius: 35upx;
			line-height: 32upx;
			text-align: center;
			background: #ff6505;
			color: #ffffff;
			margin-right: 10upx;
		}
		.info {
			flex: 1;
		}
		.min_price_desc {
			font-size: 40rpx;
			line-height: 48rpx;
			color: #333;
			padding: 30upx 0;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.name {
				width: 320upx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}
		.time {
			color: #666;
			font-size: 24rpx;
		}
		.times {
			margin: 15upx 0;
		}
		.imgs {
			image {
				width: 109upx;
				height: 70upx;
				margin-right: 20upx;
			}
		}
		.flexs2 {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 7upx;
			.flexs1 {
				display: flex;
				justify-content: flex-start;
				align-items: center;
				color: #999999;
				font-size: 24upx;
				.img {
					width: 28upx !important;
					height: 28upx !important;
					margin-left: 10upx;
				}
			}
			.btn {
				width: 140rpx;
				height: 51rpx;
				line-height: 47rpx;
				border: 1rpx solid #ff6505;
				border-radius: 28rpx;
				text-align: center;
				margin-right: 20upx;
				color: #ff6505;
			}
		}
	}
}
.popop {
	width: 100vw;
	min-height: 720rpx;
	background: #ffffff;
	border-top-left-radius: 20rpx;
	border-top-right-radius: 20rpx;
	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 20rpx;
		padding-right: 20rpx;
		image {
			width: 40rpx;
			height: 40rpx;
		}
	}
	.section1 {
		display: flex;
		align-items: center;
		padding: 20rpx;
		view:nth-of-type(1) {
			font-size: 32rpx;
			color: #666666;
		}
		view:nth-of-type(2) {
			font-size: 44rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}
	}
	.section3 {
		padding-left: 20rpx;
		padding-top: 20rpx;
		.title {
			font-size: 34rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #333333;
		}
		.sec_cont {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx 40rpx 20rpx 20rpx;
			.sec_left{
				display: flex;
				align-items: center;
				image {
					width: 48rpx;
					height: 48rpx;
				}
				text {
					padding-left: 30rpx;
					font-size: 32rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}
			.select{
				image{
					width: 42rpx;
					height: 42rpx;
				}
			}
			
		}
	}
	.foot {
		width: 710rpx;
		height: 88rpx;
		margin: 0 auto;
		margin-top: 40rpx;
		margin-bottom: 20rpx;
		background: #817BEE;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #ffffff;
		font-size: 30rpx;
		border-radius: 100rpx;
	}
}
.cons {
	height: 450upx;
	overflow-y: scroll;
}
</style>
